package com.sz.biz.logistics.ord.enums;

import com.sz.common.base.dao.ext.IEnum;

/**
 * Package: com.sz.biz.logistics.ord.enums<br>
 * Function: 传输类型
 * Author: chenzhaohui.<br>
 * Date: 2017-11-27 14:23:00.
 */
public enum TransportTypeEnum implements IEnum {
    SEA("1", "全球海运"),//全球海运
    AIR("6","全球空运"),//全球空运
    LAND("11","全球速递");//全球速递
    private String code;
    private String name;

    TransportTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static TransportTypeEnum valueOfEnum(String code) {
        TransportTypeEnum[] iss = values();
        for (TransportTypeEnum cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }
}
